package com.changil.nowonchangil.rest;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.changil.nowonchangil.controller.ServiceController;
import com.changil.nowonchangil.dto.User;

@Path("/users")
public class RestUsers {
	private ServiceController controller = new ServiceController();

	public void SetScoreService(ServiceController controller) {
		this.controller = controller;
	}

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	@Path("login")
	public User login(
			@QueryParam("id") String id,
			@QueryParam("password") String password) {
		User result = new User();
		result = controller.login(id, password);
		return result;
	}
}
